// 定义任务处理器接口
export interface TaskHandler {
  create: (params: any) => Promise<any>
  start: (params?: any) => Promise<any>
  onFinish: (result: any, params: any) => Promise<any>
  onFail: (error: any, params: any) => Promise<any>
}

// 定义事件处理函数类型
export type EventHandler = (data: any) => void

// 定义任务队列类型
export type TaskQueue = Array<{
  task: TaskHandler
  params: any
}>